<?php
/**
 * Created by PhpStorm.
 * User: Inhere
 * Date: 2015/2/11
 * Use : ...
 * File: AbstractActionController.php
 */

namespace ulue\core\controller;


abstract class AbstractActionController extends AbstractWebController
{
    /**
     * 父类控制器，多数信息都在里面
     * @var AbstractWebController
     */
    protected $parent;

    public function beforeExecute()
    {
        return true;
    }

    // public function execute()
    // {
    //     return '';
    // }

    public function afterExecute(& $output)
    {
        //..
    }


    /**
     * Gets the 父类控制器，多数信息都在里面.
     *
     * @return AbstractWebController
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Sets the 父类控制器，多数信息都在里面.
     *
     * @param AbstractWebController $parent the parent
     *
     * @return self
     */
    public function setParent(AbstractWebController $parent)
    {
        $this->parent = $parent;

        return $this;
    }
}// end class AbstractActionController